import {customeStruct} from '../utils';

const itf = customeStruct.interface;

export const InitData = itf({
    payload: itf({
        isDealerUser: 'boolean',
    })
});

export const ListData = itf({
    payload: itf({
        content: [itf({
            id: 'string',
            dealerCode: 'string',
            dealerName: 'string',
            brandCode: 'string',
            brandName: 'string',
            partSaleOrderCode: 'string',
            code: 'string',
            partInvoiceCode: 'string',
            partContractInvoiceStatus: 'number',
            invoicedDate: 'string',
            rowVersion: 'string',
            options: 'array',
        })],
        totalElements: 'number'
    })
});

export const DetailData = itf({
    payload: itf({
        id: 'string',
        brandCode: 'string',
        dealerCode: 'string',
        code: 'string',
        invoicedDate: 'string?|null',
        partInvoiceCode: 'string?|null',
        shipmentType: 'number?|null',
        origin: 'string?|null',
        destination: 'string?|null',
        shipmentDate: 'string?|null',
        expectShipmentDate: 'string?|null',
        expectDepartedDate: 'string? | null',
        actualDepartedDate: 'string? | null',
        expectArrivalDate: 'string? | null',
        actualArrivalDate: 'string? | null',
        lcCode: 'string? | null',
        declarePlace: 'number? | null',
        declareType: 'number? | null',
        shortContainerCount: 'number? | null',
        standardContainerCount: 'number? | null',
        highContainerCount: 'number? | null',
        isLCL: 'boolean? | null',
        remark: 'string? | null',
        rowVersion: 'string? | null',
        options: 'array? | null',
        declareAttachments: [
            {
                fileId: 'string',
                fileName: 'string?|null',
            }
        ],
        clearanceAttachments: [
            {
                fileId: 'string',
                fileName: 'string?|null'
            }
        ],
    })
});
